package io.vector.study.concurrent.util;

/**
 * Created by vector on 2017/3/10.
 */
public class Threads {

    public static void sleepOneSecond() {
        sleepQuietly(1000);
    }

    public static void sleepQuietly(int millis) {
        try {
            Thread.sleep(millis);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

//    public static void runSequenceWithInterval(int intervalMsec, Thread... threads) {
//        if (threads == null || threads.length == 0) {
//            return ;
//        }
//
//        Arrays.stream(threads).forEach(thread -> {
//            thread.start();
//            Threads.sleepQuietly(intervalMsec);
//        });
//    }

}
